package tmp;

// Generated 04-nov-2009 18:40:40 by Hibernate Tools 3.2.4.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Expedient generated by hbm2java
 */
@Entity
@Table(name = "expedient", catalog = "fmanzano_gem")
public class Expedient implements java.io.Serializable {

	private Integer expId;
	private ExpedientType expedientType;
	private Date expCloseDate;
	private String expComments;
	private Date expOpenDate;
	private boolean expStatus;
	private Set<ExpedientTypePhaseExpedients> expedientTypePhaseExpedientses = new HashSet<ExpedientTypePhaseExpedients>(
			0);
	private Set<Request> requests = new HashSet<Request>(0);
	private Set<ExpedientDocument> expedientDocuments = new HashSet<ExpedientDocument>(
			0);

	public Expedient() {
	}

	public Expedient(ExpedientType expedientType, Date expOpenDate,
			boolean expStatus) {
		this.expedientType = expedientType;
		this.expOpenDate = expOpenDate;
		this.expStatus = expStatus;
	}

	public Expedient(ExpedientType expedientType, Date expCloseDate,
			String expComments, Date expOpenDate, boolean expStatus,
			Set<ExpedientTypePhaseExpedients> expedientTypePhaseExpedientses,
			Set<Request> requests, Set<ExpedientDocument> expedientDocuments) {
		this.expedientType = expedientType;
		this.expCloseDate = expCloseDate;
		this.expComments = expComments;
		this.expOpenDate = expOpenDate;
		this.expStatus = expStatus;
		this.expedientTypePhaseExpedientses = expedientTypePhaseExpedientses;
		this.requests = requests;
		this.expedientDocuments = expedientDocuments;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "EXP_ID", unique = true, nullable = false)
	public Integer getExpId() {
		return this.expId;
	}

	public void setExpId(Integer expId) {
		this.expId = expId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TEX_ID", nullable = false)
	public ExpedientType getExpedientType() {
		return this.expedientType;
	}

	public void setExpedientType(ExpedientType expedientType) {
		this.expedientType = expedientType;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "EXP_CLOSE_DATE", length = 10)
	public Date getExpCloseDate() {
		return this.expCloseDate;
	}

	public void setExpCloseDate(Date expCloseDate) {
		this.expCloseDate = expCloseDate;
	}

	@Column(name = "EXP_COMMENTS", length = 250)
	public String getExpComments() {
		return this.expComments;
	}

	public void setExpComments(String expComments) {
		this.expComments = expComments;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "EXP_OPEN_DATE", nullable = false, length = 10)
	public Date getExpOpenDate() {
		return this.expOpenDate;
	}

	public void setExpOpenDate(Date expOpenDate) {
		this.expOpenDate = expOpenDate;
	}

	@Column(name = "EXP_STATUS", nullable = false)
	public boolean isExpStatus() {
		return this.expStatus;
	}

	public void setExpStatus(boolean expStatus) {
		this.expStatus = expStatus;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "expedient")
	public Set<ExpedientTypePhaseExpedients> getExpedientTypePhaseExpedientses() {
		return this.expedientTypePhaseExpedientses;
	}

	public void setExpedientTypePhaseExpedientses(
			Set<ExpedientTypePhaseExpedients> expedientTypePhaseExpedientses) {
		this.expedientTypePhaseExpedientses = expedientTypePhaseExpedientses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "expedient")
	public Set<Request> getRequests() {
		return this.requests;
	}

	public void setRequests(Set<Request> requests) {
		this.requests = requests;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "expedient")
	public Set<ExpedientDocument> getExpedientDocuments() {
		return this.expedientDocuments;
	}

	public void setExpedientDocuments(Set<ExpedientDocument> expedientDocuments) {
		this.expedientDocuments = expedientDocuments;
	}

}
